package org.looop.studio.noots.util;

import java.io.File;

public class FileUtil {
	public static void deleteFile(File file){
		if(file.isFile()){
			file.getAbsoluteFile().delete();
			return;
		}
		if(file.isDirectory()){
			File[] files = file.listFiles();
			if(files == null || files.length == 0){
				file.getAbsoluteFile().delete();
				return;
			}
			for(File f : files){
				deleteFile(f);
			}
			deleteFile(file);
		}
	}
}
